<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>图书管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		function viewComment(href){
			top.$.jBox.open('iframe:'+href,'查看评论',$(top.document).width()-220,$(top.document).height()-120,{
				buttons:{"关闭":true},
				loaded:function(h){
					$(".jbox-content", top.document).css("overflow-y","hidden");
					$(".nav,.form-actions,[class=btn]", h.find("iframe").contents()).hide();
					$("body", h.find("iframe").contents()).css("margin","10px");
				}
			});
			return false;
		}
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<form:form id="searchForm" modelAttribute="bookborrow" action="${ctx}/book/borrow/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<label>索书号：</label><form:input path="classcode" htmlEscape="false" maxlength="20" class="input-medium"/>&nbsp;
		<label>ISBN：</label><form:input path="isbn" htmlEscape="false" maxlength="20" class="input-medium"/>&nbsp;
		<label>书名：</label><form:input path="bookname" htmlEscape="false" maxlength="30" class="input-medium"/>&nbsp;
		<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>&nbsp;&nbsp;
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
		<tr>
			<th>序号</th>
			<th>书名</th>
			<th>ISBN</th>
			<th>借阅人</th>
			<th>借出日期</th>
			<th>应还日期</th>
			<th>借出状态</th>
		</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="info" varStatus="status">
			<tr>
				<td>${status.count}</td>
				<td>${info.bookname}</td>
				<td>${info.author}</td>
				<td>${info.isbn}</td>
                <td>${info.classcode}</td>
				<td>${info.publisher}</td>
				<td>${info.pubdate}</td>
				<td>${info.price}</td>
				<td>
                    <a href="${ctx}/book/manage/viewborrow?bookInfoId=${info.id}" target="_blank">查询借阅历史</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>